﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.ComponentModel;

namespace ProgNetExtensions.DataProviderTools
{
    public class DataProviderColumnCollection : CollectionBase
    {
        public DataProviderColumn this[string name]
        {
            get
            {
                foreach (object obj in this.List)
                {
                    DataProviderColumn col = obj as DataProviderColumn;
                    if (col != null && col.ColumnName == name)
                        return col;
                }
                return null;
            }
        }

        public void Add(DataProviderColumn column)
        {
            this.List.Add(column);
        }
        public void Remove(DataProviderColumn column)
        {
            this.List.Remove(column);
        }
    }
}
